feat: Playwright CDP リモートブラウザ接続 + Google Drive エビデンス保管 Skill 追加 (v4.10.0)#20
Open
takemi-ohama wants to merge 6 commits into
Open
feat: Playwright CDP リモートブラウザ接続 + Google Drive エビデンス保管 Skill 追加 (v4.10.0)#20takemi-ohama wants to merge 6 commits into
takemi-ohama wants to merge 6 commits into
Conversation
… (v4.10.0) - playwright-browser-connect: ローカル Chromium / Windows CDP / macOS CDP の 3 パターン対応 - playwright-evidence-drive: テストエビデンス一式の Google Drive 保管・共有 - config.py に BrowserConfig dataclass 追加 (mode: local|cdp-remote) - scenario.config.yaml に browser: セクション追加 - conftest.py.template に connect_over_cdp() 対応 browser fixture 追加 - 関連 Skill の参照リンクを更新 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- SKILL.md: upload_evidence.py の引数 --parent → --parent-folder-id に修正 - SKILL.md: gdrive_upload_dir.py の引数を --local/--parent に修正 - SKILL.md: build_gdoc_with_drive_links.py の引数を --md/--folder/--run-id/--name に修正 - conftest.py.template: CDP 接続時に slow_mo を渡すよう修正 - conftest.py.template: local モードで pwk_config.playwright.headless を setdefault で尊重 - conftest.py.template: CDP モード既存 Session 再利用用の _cdp_default_context fixture 追加 - playwright-browser-connect/SKILL.md: conftest.py スニペットをテンプレートと同期 - scenario.config.yaml / SKILL.md: CDP URL を ws:// → http:// に統一 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- SKILL.md: TCP proxy を廃止し --remote-allow-origins=* フラグによる Host ヘッダ検証回避に差し替え (proxy 不要でシンプル化) - conftest.py.template: CDP接続/localモード両方で scenario.config.yaml の playwright.slow_mo_ms をフォールバックとして反映 - config.py: cdp_endpoint が null (YAML でキーのみ定義) の場合に "None" 文字列にならないよう or 演算子でガード Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- SKILL.md: Chrome の 127.0.0.1 バインド問題に対応するネットワーク別接続ガイドを追加
(--remote-debugging-address=0.0.0.0 / socat / netsh portproxy の3方式 + 早見表)
- config.py: browser.mode が null の場合に ValueError でクラッシュする問題を修正
(raw.get("mode") or base.mode でデフォルト値へフォールバック)
- marketplace.json: NDF の description を v4.10.0 / 46 skills に更新
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SKILL.md や他の例示と一致するよう、旧 proxy 前提の 9223 を標準の 9222 に修正。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
takemi-ohama
commented
May 26, 2026
Contributor
Author
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 6 | codex | REQUEST_CHANGES
CDP リモートブラウザ接続は、通常の page / context 利用時にログイン済み Session を再利用できる経路と、WSL2 Docker から Windows Chrome へ実際に到達する endpoint の案内を修正してください。
takemi-ohama
commented
May 26, 2026
Contributor
Author
takemi-ohama
left a comment
There was a problem hiding this comment.
🤖 cross-review | round 6 | gemini | APPROVE
PR #20 の内容を確認しました。Playwright の CDP リモートブラウザ接続対応と Google Drive エビデンスアーカイブ機能の追加により、E2E テストの運用性が大幅に向上しています。コードの品質、ドキュメントの整備状況ともに良好です。将来的な安定性のための軽微な提案を数点行いますが、このままマージ可能です。
1. [major] conftest.py.template: context/page fixture を cdp-remote 時に 既存コンテキスト/ページを返すようオーバーライド。標準テストコードが CDP のログイン済み Session を自動的に使えるようになった。 2. [major] SKILL.md: Docker (WSL2) の接続先を host-gateway → host.docker.internal に修正。WSL2 直接実行時の Windows ホスト IP 取得方法も注記追加。 3. [minor] conftest.py.template: CDP での browser.close() が disconnect であり リモートブラウザ自体は終了しない旨のコメントを追加。 4. [minor] config.py: cdp_endpoint が空文字列/空白の場合にデフォルト値へ フォールバックするバリデーションを追加し、docstring で挙動を明記。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Playwright E2E テストエコシステムに 2 つの専門 Skill を追加し、テスト基盤を 7 Skill 体制に拡充する。
playwright-browser-connectSkill 新規追加:scenario.config.yamlのbrowser:セクションで接続モードを宣言的に切り替え (local / cdp-remote)。WSL2 Docker→Windows Chrome、macOS Docker→Chrome の CDP 接続パターンをネットワーク別セットアップ手順・トラブルシュート付きで網羅。--remote-allow-origins=*による Host ヘッダ検証回避で proxy 不要な構成を実現playwright-evidence-driveSkill 新規追加: テスト後のエビデンス一式 (video/trace/HAR/report.md) を Google Drive に保管。--pwk-drive-folder自動アップロード、手動スクリプト、report.md→Google Docs 変換 + Drive リンク埋め込みに対応。セキュリティ考慮事項 (trace.zip 内の認証情報) を明記conftest.py.templateにbrowsersession fixture 追加:browser_type_launch_argsを依存に含め--headed/slow_mo/channelを local モードに反映。CDP 接続時の Chromium 以外ブラウザの fail-fast チェック付き。_cdp_default_contextfixture で既存ログイン済み Session 再利用に対応config.pyにBrowserConfigdataclass 追加:mode(local/cdp-remote) とcdp_endpointを型安全に管理。HTTP エンドポイント (http://localhost:9222) を既定値とし、Playwright の/json/version経由 WebSocket 自動解決に準拠scenario.config.yamlテンプレート拡充:browser:セクション追加。環境変数${CDP_ENDPOINT}による接続先切り替え例をコメントで提供plugin.jsonv4.10.0: Skills 44個→46個、marketplace.json の description を更新変更ファイル一覧 (12 files, +696 -4)
plugins/ndf/skills/playwright-browser-connect/SKILL.mdplugins/ndf/skills/playwright-evidence-drive/SKILL.mdplugins/ndf/skills/playwright-kit-ops/templates/conftest.py.templateplugins/ndf/skills/playwright-kit-ops/playwright_kit/config.pyplugins/ndf/skills/playwright-kit-ops/templates/scenario.config.yamlplugins/ndf/skills/playwright-execution/SKILL.mdplugins/ndf/skills/playwright-kit-ops/SKILL.mdplugins/ndf/skills/playwright-report/SKILL.mdplugins/ndf/skills/playwright-scenario-test/SKILL.mdplugins/ndf/.claude-plugin/plugin.json.claude-plugin/marketplace.jsonplugins/ndf/CHANGELOG.mdTest plan
uv run pytest tests/ -x -q全テストパス (161 passed)claude plugin validate plugins/ndfパスBrowserConfig.from_raw()で local / cdp-remote の両モード正常パース確認conftest.py.templateの browser fixture がbrowser_type_launch_argsを正しく参照することを確認http://localhost:9222(Playwright の connect_over_cdp が期待する HTTP 形式) であることを確認